From: Cosimo Cecchi Date: Sat, 3 Jun 2017 22:37:36 +0000 (-0700) Subject: sessionMode: add a property to disable window manager menus X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~156 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3b6fae582bfffbbb0de0b263c6cb33ef9e11218a;p=gnome-shell.git sessionMode: add a property to disable window manager menus We will use this to disable menus in the initial-setup session. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/569 --- diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index 25aa75a3d..1f3e23b7a 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -25,6 +25,7 @@ const _modes = { hasWorkspaces: false, hasWindows: false, hasNotifications: false, + hasWmMenus: false, isLocked: false, isGreeter: false, isPrimary: false, @@ -86,6 +87,7 @@ const _modes = { hasRunDialog: true, hasWorkspaces: true, hasWindows: true, + hasWmMenus: true, hasNotifications: true, isLocked: false, isPrimary: true, diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js index 78b307db8..ed161765e 100644 --- a/js/ui/windowMenu.js +++ b/js/ui/windowMenu.js @@ -203,6 +203,9 @@ var WindowMenuManager = class { } showWindowMenuForWindow(window, type, rect) { + if (!Main.sessionMode.hasWmMenus) + return; + if (type != Meta.WindowMenuType.WM) throw new Error('Unsupported window menu type'); let menu = new WindowMenu(window, this._sourceActor);